﻿using DotNetty.Transport.Channels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShaoLuNettyServer
{
    public class DotNettyClientHandler : SimpleChannelInboundHandler<string>
    {
        private static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        protected override void ChannelRead0(IChannelHandlerContext context, string message)
        {
            Console.WriteLine("Received message from server: " + message);
            Logger.Info("Received message from server: " + message);
        }
    }
}
